# == Class ceph::mon
#
# Ceph monitor setup.
#
class ceph::mon {
  if has_key($::ceph::monitor_hosts, $::fqdn) {
    ceph::key { 'mon.':
      key => $::ceph::mon_key,
      mon => 'allow *',
    }

    ceph::key { 'client.admin':
      key  => $::ceph::admin_key,
      auid => 0,
      mds  => 'allow',
      mon  => 'allow *',
      osd  => 'allow *'
    }

    if ($::ceph::manage_firewall) {
      firewall { '100 Ceph Monitor port':
        dport  => '6789',
        proto  => 'tcp',
        action => 'accept',
      }
    }
  }
}
